package com.lvcoding.cloud.api.feign.factory;

import com.lvcoding.cloud.api.feign.OrderFeign;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

/**
 * @Description 描述
 * @Date 2020-07-18 3:03 下午
 * @Author wuyanshen
 */
@Slf4j
public class OrderFeignFallbackFactory implements FallbackFactory<OrderFeign> {
    @Override
    public OrderFeign create(Throwable throwable) {
        log.info("订单服务熔断降级。。。");
        return new OrderFeign() {
            @Override
            public String nacos() {
                return "订单服务熔断降级...";
            }
        };
    }
}
